package org.flyby.api.dao;

import org.flyby.api.persistence.BaseEntity;

import java.io.Serializable;
import java.util.Collection;

public interface BaseCommonDao<E extends BaseEntity> {

    E findById(Serializable id);

    E save(final E entity);

    E save(final E entity, boolean refresh);

    E update(final E entity);

    void remove(final E entity);

    void removeAll(final Collection<E> entities);

}
